package com.kai.mapper;

import com.kai.anno.AutoFill;
import com.kai.entity.User;
import com.kai.enumeration.AutoFillEnum;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;

@Mapper
public interface UserMapper {

    Integer userNameIsExist(String userName);

    Integer emailIsExist(String email);

    User getUserByUserName(String userName);

    @AutoFill(AutoFillEnum.INSERT)
    void insert(User user);

    @AutoFill(AutoFillEnum.UPDATE)
    void update(User user);

    Integer idCardIsExist(String idCard);

    void setStatus(int i, Long id, LocalDateTime now);
}
